class Front::HomeController < Front::ApplicationController
  def index
    add_breadcrumb '首页', request.path
    # sleep 5
  end

  def change_password
    add_breadcrumb '修改密码', request.path
    if request.method_symbol == :get
    else
      if current_user.update_with_password current_password: params[:user][:current_password], password: params[:user][:password]
        flash[:alert] = '密码修改成功, 需重新登录!'
        redirect_to new_user_session_path
      end
    end
  end
end
